import base
import datetime
import uuid
from web import models

def run():
    # 获取用户实例
    user_instance = models.UserInfo.objects.get(id=2)
    # 获取价格策略实例
    price_policy_instance = models.PricePolicy.objects.get(id=1)
    
    models.Transaction.objects.create(
        status=2,
        order=uuid.uuid4(),
        user=user_instance,
        price_policy=price_policy_instance,
        count=1,
        price=0,
        start_datetime=datetime.datetime.now(),
        create_datetime=datetime.datetime.now(),
    )
if __name__ == '__main__':
    run()